package com.atguigu.guli.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("guli-product")
public interface ProductFeignService {
    /**
     *          /product/spuinfo/info/{id}
     *          /api/product/spuinfo/info/{id}
     *      1)、让所有请求过网关：
     *          1、给guli-gateway所在机器发请求，("guli-gateway")
     *          2、/api/product/spuinfo/info/{id}
     *      2）、不想过网关
     *          1、直接让后台服务处理，("guli-product")
     *          2、/product/spuinfo/info/{id}
     * @return
     */
    @RequestMapping("/product/spuinfo/info/{id}")
    public R info(@PathVariable("id") Long id);
}
